home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / iconal1a / iconbook.frm < prev    next >
Text File  |  1999-10-08  |  10KB  |  310 lines

  1. VERSION 4.00
  2. Begin VB.Form IconBook 
  3.    AutoRedraw      =   -1  'True
  4.    BackColor       =   &H00C0C0C0&
  5.    Caption         =   "IconAlbum     1999 by Swertvaegher Stephan"
  6.    ClientHeight    =   7275
  7.    ClientLeft      =   975
  8.    ClientTop       =   1560
  9.    ClientWidth     =   10950
  10.    Height          =   7680
  11.    Icon            =   "IconBook.frx":0000
  12.    Left            =   915
  13.    LinkTopic       =   "Form1"
  14.    ScaleHeight     =   485
  15.    ScaleMode       =   3  'Pixel
  16.    ScaleWidth      =   730
  17.    Top             =   1215
  18.    Width           =   11070
  19.    Begin VB.Frame Frame1 
  20.       Caption         =   "Commands"
  21.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  22.          Name            =   "MS Sans Serif"
  23.          Size            =   12
  24.          Charset         =   0
  25.          Weight          =   700
  26.          Underline       =   0   'False
  27.          Italic          =   0   'False
  28.          Strikethrough   =   0   'False
  29.       EndProperty
  30.       ForeColor       =   &H00FF0000&
  31.       Height          =   1545
  32.       Left            =   90
  33.       TabIndex        =   4
  34.       Top             =   5670
  35.       Width           =   2265
  36.       Begin VB.CommandButton Command2 
  37.          Caption         =   "Search for Icons"
  38.          Height          =   330
  39.          Left            =   315
  40.          TabIndex        =   6
  41.          Top             =   990
  42.          Width           =   1635
  43.       End
  44.       Begin VB.CommandButton Command1 
  45.          Caption         =   "Make new directory"
  46.          Height          =   330
  47.          Left            =   315
  48.          TabIndex        =   5
  49.          Top             =   540
  50.          Width           =   1635
  51.       End
  52.    End
  53.    Begin VB.PictureBox Pic2 
  54.       AutoRedraw      =   -1  'True
  55.       BorderStyle     =   0  'None
  56.       Height          =   6765
  57.       Left            =   2430
  58.       ScaleHeight     =   6765
  59.       ScaleWidth      =   8385
  60.       TabIndex        =   2
  61.       Top             =   405
  62.       Width           =   8385
  63.       Begin VB.PictureBox Pic1 
  64.          AutoSize        =   -1  'True
  65.          BackColor       =   &H00E0E0E0&
  66.          BorderStyle     =   0  'None
  67.          Height          =   480
  68.          Index           =   0
  69.          Left            =   180
  70.          ScaleHeight     =   480
  71.          ScaleWidth      =   480
  72.          TabIndex        =   3
  73.          Top             =   180
  74.          Visible         =   0   'False
  75.          Width           =   480
  76.       End
  77.    End
  78.    Begin VB.DirListBox Dir1 
  79.       BackColor       =   &H00C0FFC0&
  80.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  81.          Name            =   "MS Sans Serif"
  82.          Size            =   8.25
  83.          Charset         =   0
  84.          Weight          =   700
  85.          Underline       =   0   'False
  86.          Italic          =   0   'False
  87.          Strikethrough   =   0   'False
  88.       EndProperty
  89.       ForeColor       =   &H008080FF&
  90.       Height          =   4980
  91.       Left            =   45
  92.       TabIndex        =   1
  93.       Top             =   45
  94.       Width           =   2310
  95.    End
  96.    Begin VB.FileListBox File1 
  97.       Height          =   3570
  98.       Left            =   2340
  99.       Pattern         =   "*.ico"
  100.       TabIndex        =   0
  101.       Top             =   2925
  102.       Visible         =   0   'False
  103.       Width           =   1590
  104.    End
  105.    Begin VB.Label Label2 
  106.       Alignment       =   2  'Center
  107.       BackColor       =   &H00C0FFC0&
  108.       BorderStyle     =   1  'Fixed Single
  109.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  110.          Name            =   "MS Sans Serif"
  111.          Size            =   9.75
  112.          Charset         =   0
  113.          Weight          =   700
  114.          Underline       =   0   'False
  115.          Italic          =   0   'False
  116.          Strikethrough   =   0   'False
  117.       EndProperty
  118.       ForeColor       =   &H000000FF&
  119.       Height          =   510
  120.       Left            =   45
  121.       TabIndex        =   8
  122.       Top             =   5085
  123.       Width           =   2310
  124.    End
  125.    Begin VB.Label Label1 
  126.       BackColor       =   &H00C0FFC0&
  127.       BorderStyle     =   1  'Fixed Single
  128.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  129.          Name            =   "MS Sans Serif"
  130.          Size            =   9.75
  131.          Charset         =   0
  132.          Weight          =   700
  133.          Underline       =   0   'False
  134.          Italic          =   0   'False
  135.          Strikethrough   =   0   'False
  136.       EndProperty
  137.       ForeColor       =   &H000000FF&
  138.       Height          =   330
  139.       Left            =   2430
  140.       TabIndex        =   7
  141.       Top             =   45
  142.       Width           =   8340
  143.    End
  144.    Begin MSComDlg.CommonDialog ComD1 
  145.       Left            =   10395
  146.       Top             =   0
  147.       _ExtentX        =   847
  148.       _ExtentY        =   847
  149.       _Version        =   393216
  150.       CancelError     =   -1  'True
  151.       DefaultExt      =   ".ico"
  152.       Flags           =   2
  153.    End
  154.    Begin VB.Menu mnuFile 
  155.       Caption         =   ""
  156.       Visible         =   0   'False
  157.       Begin VB.Menu mnuSaveAs 
  158.          Caption         =   "Save Icon As"
  159.       End
  160.       Begin VB.Menu mnuMove 
  161.          Caption         =   "Move Icon"
  162.       End
  163.       Begin VB.Menu mnuDelete 
  164.          Caption         =   "Delete Icon"
  165.       End
  166.    End
  167. End
  168. Attribute VB_Name = "IconBook"
  169. Attribute VB_Creatable = False
  170. Attribute VB_Exposed = False
  171.  
  172. Private Sub Command1_Click() 'Make new dir
  173. On Error GoTo mkdir0
  174. Temp$ = InputBox("Type the name of the new directory" & vbCr & "you want to create.", "IconAlbum")
  175. If Temp$ = "" Then Pic2.SetFocus: Exit Sub
  176. MkDir IBpath$ & "\" & Temp$
  177. Dir1.Refresh
  178. Pic2.SetFocus
  179. mkdir0:
  180. End Sub
  181.  
  182. Private Sub Command2_Click()
  183. SearchForm.Show 1
  184. Pic2.SetFocus
  185. End Sub
  186.  
  187. Private Sub Dir1_Change()
  188. Dir1.Path = IBpath
  189. End Sub
  190.  
  191. Private Sub Dir1_Click()
  192. For xx% = 0 To 179
  193. Pic1(xx%).Picture = LoadPicture("")
  194. Pic1(xx%).Visible = False
  195. Next xx%
  196. File1.Path = Dir1.List(Dir1.ListIndex)
  197.  
  198. If File1.ListCount <= 180 Then
  199. Idx% = File1.ListCount - 1
  200. Else
  201. Idx% = 179
  202. End If
  203. Label1.Caption = Dir1.List(Dir1.ListIndex)
  204. Label2.Caption = "Icons in map:" & vbCr & Idx% + 1
  205. For xx% = 0 To Idx%
  206. If Right(File1.Path, 1) = "\" Then
  207. Pic1(xx%).Picture = LoadPicture(File1.Path + File1.List(xx%))
  208. Else
  209. Pic1(xx%).Picture = LoadPicture(File1.Path + "\" + File1.List(xx%))
  210. End If
  211. Pic1(xx%).Visible = True
  212. Next xx%
  213. End Sub
  214.  
  215. Private Sub Form_Activate()
  216. 'Pic2.SetFocus
  217. End Sub
  218.  
  219. Private Sub Form_Load()
  220. Call ColForm(Pic2, 128, 148, 96, 50)
  221. IBpath = App.Path
  222. IconBook.Move (Screen.Width - IconBook.Width) / 2, (Screen.Height - IconBook.Height) / 2
  223. For xx = 1 To 179
  224. Load Pic1(xx%)
  225. Next xx
  226. For xx = 0 To 14
  227. Pic1(xx%).Left = Pic1(0).Left + (xx% * 36)
  228. Pic1(xx% + 15).Left = Pic1(0).Left + (xx% * 36)
  229. Pic1(xx% + 30).Left = Pic1(0).Left + (xx% * 36)
  230. Pic1(xx% + 45).Left = Pic1(0).Left + (xx% * 36)
  231. Pic1(xx% + 60).Left = Pic1(0).Left + (xx% * 36)
  232. Pic1(xx% + 75).Left = Pic1(0).Left + (xx% * 36)
  233. Pic1(xx% + 90).Left = Pic1(0).Left + (xx% * 36)
  234. Pic1(xx% + 105).Left = Pic1(0).Left + (xx% * 36)
  235. Pic1(xx% + 120).Left = Pic1(0).Left + (xx% * 36)
  236. Pic1(xx% + 135).Left = Pic1(0).Left + (xx% * 36)
  237. Pic1(xx% + 150).Left = Pic1(0).Left + (xx% * 36)
  238. Pic1(xx% + 165).Left = Pic1(0).Left + (xx% * 36)
  239. Pic1(xx%).Top = Pic1(0).Top
  240. Pic1(xx% + 15).Top = Pic1(0).Top + 36
  241. Pic1(xx% + 30).Top = Pic1(0).Top + 72
  242. Pic1(xx% + 45).Top = Pic1(0).Top + 108
  243. Pic1(xx% + 60).Top = Pic1(0).Top + 144
  244. Pic1(xx% + 75).Top = Pic1(0).Top + 180
  245. Pic1(xx% + 90).Top = Pic1(0).Top + 216
  246. Pic1(xx% + 105).Top = Pic1(0).Top + 252
  247. Pic1(xx% + 120).Top = Pic1(0).Top + 288
  248. Pic1(xx% + 135).Top = Pic1(0).Top + 324
  249. Pic1(xx% + 150).Top = Pic1(0).Top + 360
  250. Pic1(xx% + 165).Top = Pic1(0).Top + 396
  251. Next xx%
  252. Dir1.Path = IBpath
  253. End Sub
  254.  
  255. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  256. End
  257. End Sub
  258.  
  259. Private Sub mnuDelete_Click()
  260. Temp$ = MsgBox("Are you sure you want to delete the icon: " & vbCr & vbCr & Dir1.List(Dir1.List